// Version 0.1.1

using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace vOxelatOr
{
    public class vOxelatOr : Microsoft.Xna.Framework.Game
    {
        GraphicsDeviceManager graphics;
        SpriteBatch spriteBatch;
        int SizeX = 16, SizeY = 16, SizeZ = 16; // World size

        bool[, ,] WorldArray;

        public vOxelatOr()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            WorldArray = new bool[SizeX, SizeY, SizeZ]; // Creating array with fixed size
            Random rand = new Random();

            for (int x = 0; x <= SizeX; x++)  // initializing the WorldArray
            {
                for (int y = 0; y <= SizeY; y++)
                {
                    for (int z = 0; z <= SizeZ; z++)
                    {
                        int r = rand.Next(0, 100);
                        if (r < 50)
                            WorldArray[x, y, z] = false;
                        else
                            WorldArray[x, y, z] = true;
                    }
                }
            }
            
        }

        protected override void Initialize()
        {

            base.Initialize();
        }

        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

        }

        protected override void UnloadContent()
        {
        }

        protected override void Update(GameTime gameTime)
        {
            // Allows the game to exit
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
                this.Exit();


            base.Update(gameTime);
        }

        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);


            base.Draw(gameTime);
        }
    }
}
